export type CheckUserType = {
  mobile: string,
  paw: string
}
export type RegMobileType = {
  invite_code: string,
  nickname: string,
  mobile: string,
  paw: string,
  ve_code: string,
}
export type codeType = {
  mobile: string,
  type: string,
  code?: string
}
export type buyProductType = {
  product_id: string,
  buy_num: string
}

export type cardType = {
  ifsc: string,
  name: string,
  card: string,
  pay_pass: string
}

export type forgetLoginPawType = {
  mobile: string,
  ve_code: string,
  pass: string,
}

export type upLoginPawType = {
  ologin_pass: string,
  pass: string
}


export enum payEnum {
  Update = '1',
  Reset = '2',
  trade = '3'
}
export type upOrForgetPayPaw = {
  type: payEnum,
  pay_pass: string,
  original_pass?: string,
  ve_code?: string
}
export type resetLoginType = {
  mobile: string,
  ve_code: string,
  pass: string,
}

export type EmailCondition<T extends { type: 1 | 2 }> = {
  [K in keyof T]: T['type'] extends 1 ? Omit<T, 'address'> : Omit<T, 'bank_id'>;
}[keyof T];
export type withdrawalType = {
  amount: string,
  type: 1 | 2,
  bank_id?: string,
  address?: string,
  pay_pass: string,
}


